package br.com.drestranho.escola.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="matricula", schema="public")
public class Matricula implements Serializable {
	@Id
	@SequenceGenerator(name="seq_matricula", sequenceName="seq_matricula", allocationSize=1)
	@GeneratedValue(generator="seq_matricula", strategy=GenerationType.SEQUENCE)
	@Column(name="id")
	Integer id;
	@ManyToOne
    @JoinColumn(name="id_turma", referencedColumnName="id")
	Turma turma;
	@ManyToOne
    @JoinColumn(name="id_aluno", referencedColumnName="id")
	Aluno aluno;
	@Column(name="cod_matricula")
	String CodMatricula;
	@Column(name="ano")
	Integer ano;
	@Column(name="num_chamada")
	Integer numChamada;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
	public Turma getTurma() {
		return turma;
	}
	
	public void setTurma(Turma turma) {
		this.turma = turma;
	}
	
	public Aluno getAluno() {
		return aluno;
	}
	
	public void setAluno(Aluno aluno) {
		this.aluno = aluno;
	}
	
	public String getCodMatricula() {
		return CodMatricula;
	}

	public void setCodMatricula(String codMatricula) {
		CodMatricula = codMatricula;
	}

	public Integer getAno() {
		return ano;
	}
	
	public void setAno(Integer ano) {
		this.ano = ano;
	}
	
	public Integer getNumChamada() {
		return numChamada;
	}
	
	public void setNumChamada(Integer numChamada) {
		this.numChamada = numChamada;
	}

}
